package hy.entity;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Data
@Component("hello")
public class A {
    @Autowired(required = true) //在容器中按类型找实例
//    @Qualifier("hy.entity.B#0")
//    @Resource(name="b")
    B b;
}
